<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>运动员报名信息编辑</title>
    <%@ include file="/WEB-INF/views/common/easyui.jsp"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    <script src="${ctx}/static/plugins/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="${ctx}/static/plugins/easyui/common/jquery.select.js"type="text/javascript"></script>
    <link type="text/css" rel="stylesheet" href="${ctx}/static/css/table.css" />
</head>
<body>
<form id="safeForm" method="post" action="${ctx}/bm/AdminBmSave" enctype="multipart/form-data">
    <table>
        <input type="hidden" id="userId" name="userId" value='${user.userId}'/>
        <input type="hidden" id="bsInfo" name="bsInfo"/>
        <tr>
            <td colspan="4" style="background-color: #ccc;text-align: left;"> 基本信息</td>
        </tr>
        <tr>
            <td><label>姓名:</label></td>
            <td><input id="name" name="name" value=""></input></td>
            <td><label>身份证号:</label></td>
            <td><input id="idCard" name="idCard" value="${user.userName}"></input></td>
        </tr>
        <tr>
            <td><label>性别:</label></td>
            <td><select id="sex" name="sex">
                <%--sexDic 性别字典--%>
                <option value="">请选择</option>
                <c:forEach items="${sexDic}" var="sexDic">
                    <option value="${sexDic.code}">${sexDic.name}</option>
                </c:forEach>
            </select></td>
            <td><label>联系方式:</label> </td>
            <td><input id="phone" name="phone" value=""></td>
        </tr>

        <tr>
            <td><label>来源地市:</label></td>
            <td colspan="3">
                <input id="pro" name="address" value="">省</input>
                <input id="city" name="city" value="">市</input>
            </td>
        </tr>

        <tr>
            <td colspan="4" style="background-color: #ccc;text-align: left;">参赛信息</td>
        </tr>

        <tr>
            <td><label>参赛项目:</label></td>
            <td colspan="3">
                <%--参赛项目字典--%>
                <c:forEach items="${ItemDic}" var="dic">
                    <input style="width: 30px" onclick="checkBox()" name="channel_box" type="checkbox" value="${dic.code}"/>
                    <span>${dic.name}</span>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </c:forEach>
            </td>
        </tr>

        <tr>
            <td colspan="4" style="background-color: #ccc;text-align: left;">证件信息</td>
        </tr>

        <tr>
            <td><label>身份证明:</label></td>
            <td colspan="3">
            <a href="javascript:void(0)" class="Fupload">上传身份证正面
            <input type="file" id="shenfenInfo" name="shenfenInfo" class="Fchange" multiple="multiple"/></a>
            </td>
        </tr>

        <tr>
            <td><label>健康证明:</label></td>
            <td colspan="3">
                <a href="javascript:void(0)" class="Fupload">上传健康证明
                <input type="file" id="jiankangInfo" name="jiankangInfo"  class="Fchange" multiple="multiple"/>
                </a>
            </td>
        </tr>

        <tr>
            <td><label>保险证明:</label></td>
            <td colspan="3">
                <a href="javascript:void(0)" class="Fupload">上传保险证明
                <input type="file" id="baoxianInfo" name="baoxianInfo"  class="Fchange" multiple="multiple"/>
                </a>
            </td>
        </tr>

        <tr>
            <td><label>缴费证明:</label></td>
            <td colspan="3">
                <a href="javascript:void(0)" class="Fupload">上传缴费证明
                <input type="file" id="jiaofeiInfo" name="jiaofeiInfo"  class="Fchange" multiple="multiple"/>
                </a>
            </td>
        </tr>

    </table>
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="save();">保存</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="back();">返回</a>
</form>
</body>

<script type="text/javascript">
    function save(){
        framework.saveForm($("#safeForm").form(),function (result) {
            if (result.success) {
                framework.alert('提示',result.msg,'info');
                window.parent.mainpage.mainTabs.closeCurrentTab();
                return true;
            }else{
                framework.alert('提示',result.msg,'info');
            }
        });
    };

    function back(){
        window.parent.mainpage.mainTabs.closeCurrentTab();
    };

    function checkBox(){
        var str ="";
        $("[name='channel_box']:checked").each(function(){
            str+=$(this).val();
        });
        $("#bsInfo").val(str);
    }
</script>
<script src="${ctx}/static/plugins/easyui/common/YDataGrid.js?v=11" type="text/javascript"></script>
</body>
</html>